<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        margin: 10px;
    }
    .box{
        width: 900px;
        height: auto;
        
        
        
    }
    .x{
        display: inline-block;
        height: 50px;
        width: 50px;
        border: 2px solid gray;
        border-radius: 50%;
        text-align: center;
        line-height: 49px;
        
        margin-left: 50px;
       
    }
    .x:nth-child(2n){
        background-color: red;
    }
    .x:nth-child(2n+1){
        background-color: blue;
    }
   

</style>
<body>
    <div class="box">

        <div class="x">1</div>
        <div  class="x">2</div>
        <div  class="x">3</div>
        <div  class="x">4</div>
        <div  class="x">5</div>
        <div  class="x">6</div>
        <div  class="x">7</div>
        <div  class="x">8</div>
        <div  class="x">9</div>
        <span class="x">10</span>
        <span class="x">11</span>
        <span class="x">12</span>
        <span class="x">13</span>
        <span class="x">14</span>
        <p class="x">15</p>
        <p class="x">16</p>
        <p class="x">17</p>
        <p class="x">18</p>
        <p class="x">19</p>
        <p class="x">20</p>
            
    
    
   

    </div>
    
    
</body>
</html>                                      